package com.example.zyl.common.utils.excel;

import com.example.zyl.api.entity.SysUser;
import org.apache.ibatis.session.ResultContext;
import org.apache.ibatis.session.ResultHandler;

public class CustomResultHandler implements ResultHandler {
    private final DownloadProcessor downloadProcessor;

    public CustomResultHandler(
            DownloadProcessor downloadProcessor) {
        super();
        this.downloadProcessor = downloadProcessor;
    }

    @Override
    public void handleResult(ResultContext resultContext) {
        SysUser authors = (SysUser) resultContext.getResultObject();
        downloadProcessor.processData(authors);
    }

}
